import { requestClient } from '#/api/request';

export interface RouterMeta {
  title: string;
  icon: string;
  hidden: boolean;
  keepAlive: boolean;
  link?: string;
  query?: Record<string, string>;
}

export interface Router {
  meta: RouterMeta;
  name: string;
  path: string;
  component: string;
  children: Router[];
}

/**
 * 获取用户所有菜单
 */
export async function getRouterApi() {
  return requestClient.get<Router[]>('/ur_biz/menu/router');
}
